#--------------------------------------------------------------------------#
# This file is for testing combinations of sequences and mappings
#--------------------------------------------------------------------------#

#####################################################################
# Null HASH/ARRAY

=== null hash in array
--- yaml
---
- foo
- {}
- bar
--- perl
[ [ 'foo', {}, 'bar' ] ]


=== null array in array
--- yaml
---
- foo
- []
- bar
--- perl
[ [ 'foo', [], 'bar' ] ]


=== null hash in hash
--- yaml
---
foo: {}
bar: 1
--- perl
[  { foo => {}, bar => 1 } ]


=== null array in hash
--- yaml
---
foo: []
bar: 1
--- perl
[  { foo => [], bar => 1 } ]

# Simple array inside a hash with an undef
=== array_in_hash
--- yaml
---
foo:
  - bar
  - ~
  - baz

--- perl
[ { foo => [ 'bar', undef, 'baz' ] } ]


# Simple hash inside a hash with an undef
=== hash_in_hash
--- yaml
---
foo: ~
bar:
  foo: bar

--- perl
[ { foo => undef, bar => { foo => 'bar' } } ]


# Mixed hash and scalars inside an array
=== hash_in_array
--- yaml
---
-
  foo: ~
  this: that
- foo
- ~
-
  foo: bar
  this: that

--- perl
[ [
    { foo => undef, this => 'that' },
    'foo',
    undef,
    { foo => 'bar', this => 'that' },
] ]


######################################################################
# Non-Indenting Sub-List

=== Non-indenting sub-list
--- yaml
---
foo:
- list
bar: value
--- perl
[ { foo => [ 'list' ], bar => 'value' } ]
--- noyamlpm



# Inline nested hash
=== inline_nested_hash
--- yaml
---
- ~
- foo: bar
  this: that
- baz

--- perl
[ [ undef, { foo => 'bar', this => 'that' }, 'baz' ] ]


# RT 51491
=== space after hypen
--- yaml
\---
FOO:
  - 
    bar: baz 
--- perl
[ { 'FOO' => [ { bar => 'baz' } ] } ]
